package lntu.d1106.demo;
//接口可继承
interface Shape {
    public abstract double getArea(double x);
    public abstract double getLength(double x);

}
class Square implements Shape{
    @Override
    public double getArea(double x) {
        return x * x;
    }

    @Override
    public double getLength(double x) {
        return 4 * x;
    }
}
class Cricle implements Shape{
    @Override
    public double getArea(double x) {
        return Math.PI * x * x;
    }

    @Override
    public double getLength(double x) {
        return Math.PI * 2 * x;
    }
}

interface Aaa{}
class Rectangle implements Shape,Aaa{
    @Override
    public double getArea(double x) {
        return 0;
    }

    @Override
    public double getLength(double x) {
        return 0;
    }
}
